import {requestService} from '/src/utils/request'

// 查询设备列表
export function listDevice(query) {
    return requestService({
        url: '/xiaozhen-system/device/list',
        method: 'get',
        params: query
    })
}


// 新增设备
export function addDevice(data) {
    return requestService({
        url: '/xiaozhen-system/device/add',
        method: 'post',
        data: data
    })
}

// 修改设备
export function updateDevice(data) {
    return requestService({
        url: '/xiaozhen-system/device/update',
        method: 'put',
        data: data
    })
}

// 删除设备
export function deleteDevice(deviceId) {
    return requestService({
        url: '/xiaozhen-system/device/' + deviceId,
        method: 'delete'
    })
}
